package com.wensen.ribbitmq;

import entity.EmailInfo;
import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class RibbitMqSender {

    @Autowired
    private AmqpTemplate amqpTemplate;

    public void send(EmailInfo info){
        this.amqpTemplate.convertAndSend("direct","downOrder",info);
    }
}
